home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 April
/
EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso
/
Recent1
/
Filer4_01.lha
/
Filer
/
Rexx
/
PrintDir.filer
< prev
next >
Wrap
Text File
|
1996-07-10
|
1KB
|
83 lines
/*
$VER: PrintDir.filer 2.2 (10.7.95)
Author:
Matthias Scheler <tron@lyssa.owl.de>
Function:
Opens a string requester, asks for a output file and writes a listing of
the selected directory listview to the output file.
History:
2.1 removed unnecessary ADDRESS 'FilerRexx'
2.2 removed unnecessary printer command
Call:
PrintDir
Example for "Filer.RC":
BUTTON ...,...,"Print Dir","PrintDir"
*/
OPTIONS RESULTS
GETSOURCEPATH
IF RESULT="RESULT" THEN EXIT 5
SourceDir=RESULT
LOCKFILER
IF RESULT="RESULT" THEN EXIT 5
Key=Result
PANEL OFF
'STATUS Print directory'
'SETSTRING PRT:'
GETSTRING 'Choose file, or printer:'
IF RESULT="RESULT" THEN
DO
PANEL ON
UNLOCKFILER Key
EXIT 5
END
TargetName=RESULT
IF OPEN('Prt',TargetName,'WRITE')=0 THEN
DO
PANEL ON
UNLOCKFILER Key
ALERTBOX "Couldn't open output file !"
EXIT 5
END
'STATUS Printing directory "'||SourceDir||'" to "'||TargetName||'" ...'
CALL WRITELN('Prt','Directory "'||SourceDir||'":')
GETNUMENTRIES
Num=RESULT
DO Index=1 TO Num
GETNAME Index
Name=RESULT
GETINFO Index
Info=RESULT
IF UPPER(LEFT(Name,1))='F' THEN Line=LEFT(SUBSTR(Name,2)||' ',31)
ELSE Line=X2C(1B)||'[1m'||LEFT(SUBSTR(Name,2)||' ',31)||X2C(1B)||'[0m'
CALL WRITELN('Prt',Line||Info)
END
CALL WRITECH('Prt',X2C(C))
CALL CLOSE('Prt')
'HISTORY Printed directory "'||SourceDir||'" to "'||TargetName||'".'
PANEL ON
UNLOCKFILER Key